]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspacesView: Really don't animate primary view when fading
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 11 Jul 2020 16:19:27 +0000 (18:19 +0200)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 13 Jul 2020 17:24:43 +0000 (17:24 +0000)
In commit 9297d87775d64 we stopped syncing the primary view's actual
geometry at the start of the transition when doing a fade animation,
however the view animation may still be triggered by an allocation
change.

Prevent those unwanted size changes during fade by keeping track of
the fade state and explicitly skip syncing the geometry while a fade
is ongoing.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2969

js/ui/workspacesView.js

index c74c6e9c7e4beb66d1d6452ca16491c5a44bbc8a..c3ad4b6cf02c5a117b74ff625627acfc54d9e064 100644 (file)
@@ -383,8 +383,10 @@ class WorkspacesDisplay extends St.Widget {
         this._windowDragEndId =
             Main.overview.connect('window-drag-begin',
                 this._windowDragEnd.bind(this));
-        this._overviewShownId = Main.overview.connect('shown',
-            this._syncWorkspacesActualGeometry.bind(this));
+        this._overviewShownId = Main.overview.connect('shown', () => {
+            this._inWindowFade = false;
+            this._syncWorkspacesActualGeometry();
+        });
 
         this._primaryIndex = Main.layoutManager.primaryIndex;
         this._workspacesViews = [];
@@ -403,6 +405,7 @@ class WorkspacesDisplay extends St.Widget {
 
         this._actualGeometry = null;
         this._inWindowDrag = false;
+        this._inWindowFade = false;
 
         this._gestureActive = false; // touch(pad) gestures
         this._canScroll = true; // limiting scrolling speed
@@ -560,6 +563,8 @@ class WorkspacesDisplay extends St.Widget {
             this._workspacesViews[i].animateToOverview(animationType);
         }
 
+        this._inWindowFade = fadeOnPrimary;
+
         if (this._actualGeometry && !fadeOnPrimary)
             this._syncWorkspacesActualGeometry();
 
@@ -583,6 +588,8 @@ class WorkspacesDisplay extends St.Widget {
             this._workspacesViews[i].animateFromOverview(animationType);
         }
 
+        this._inWindowFade = fadeOnPrimary;
+
         const { primaryIndex } = Main.layoutManager;
         const { x, y, width, height } =
             Main.layoutManager.getWorkAreaForMonitor(primaryIndex);
@@ -707,7 +714,7 @@ class WorkspacesDisplay extends St.Widget {
 
     _syncWorkspacesActualGeometry() {
         const primaryView = this._getPrimaryView();
-        if (!primaryView)
+        if (!primaryView || this._inWindowFade)
             return;
 
         primaryView.ease({